import fetch from "../fetch";

/**
 * payitem service
 */
const User = {
  get: () =>
    fetch({
      url: "/api/admin/store/get",
      method: "get"
    }),
  login: password =>
    fetch({
      url: "/api/admin/store/login",
      method: "post",
      data: {
        password: password
      }
    }),
  logout: () =>
    fetch({
      url: "/api/admin/store/logout",
      method: "get"
    }),
  info: () =>
    fetch({
      url: "/api/admin/store/info",
      method: "get"
    }),
  save: store =>
    fetch({
      url: "/api/admin/store/save",
      method: "post",
      data: {
        store: store
      }
    })
};

export default User;
